<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
	<link rel = "Shortcut Icon" href="http://www.kaishengit.com/favicon.ico" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<style>
		blockquote{
			margin-top:15px;
			margin-bottom:30px;
		}
	</style>
</head>
<body>
	<div class="container">
		<div class="navbar">
			<div class="navbar-inner">
				<div class="container">
					<a href="main" class="brand">凯盛项目管理系统</a>
					<ul class="nav pull-right">
						<li class="active">
							<a>${sessionScope.user.name }</a>
						</li>
						<li>
							<a href="user">个人资料</a>
						</li>
						<li class="divider-vertical"></li>
						<li>
							<a href="loginout">安全退出</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="span3">
				<div class="wall">
					<ul class="nav nav-list">
						<li class="nav-header">${project.name }</li>
						<li class="divider"></li>
						<li class="active">
							<a href="project?id=${project.id }">
								<i class="icon-white icon-home"></i>最新动态
							</a>
						</li>
						<li>
							<a href="goal">
								<i class="icon-flag"></i>目标
							</a>
						</li>
						<li>
							<a href="document">
								<i class="icon-folder-open"></i>资料库
							</a>
						</li>
						<li>
							<a href="folder">
								<i class="icon-file"></i>文件共享
							</a>
						</li>
						<li>
							<a href="contact">
								<i class="icon-user"></i>联系人
							</a>
						</li>
						<li>
							<a href="idea">
								<i class="icon-fire"></i>想法
							</a>
						</li>
						<li>
							<a href="project?m=edit">
								<i class="icon-cog"></i>项目设置
							</a>
						</li>
					</ul>
				</div>
			</div>
			<div class="span6">
				<ul class="breadcrumb" style="margin-bottom:0px">
					<li class="active">
						<i class="icon-th"></i>你在想什么
					</li>
				</ul>
				<div class="wall">
					<form style="margin:0px" method="post" action="project?${project.id }" id="myform">
						<textarea id="context" rows="3" style="width:415px" name="context"></textarea>
						<button class="btn btn-primary" type="button" id="btn">发布</button>
					</form>
				</div>
				<ul class="breadcrumb">
					<li class="active">
						<i class="icon-th"></i>信息流
					</li>
				</ul>
				<c:forEach var="message" items="${messages.result }">
					<blockquote>
						<p style="font-size:14px;line-height:1.5">${message.context }</p>
						<small class="pull-right">
							${message.userName } 发布于 ${message.strTime }
						</small>
						<div class="clear"></div>
					</blockquote>
				</c:forEach>
				<div class="pagination pull-right">
					<ul>
					  	<c:choose>
					  		<c:when test="${messages.nowPageNum != 1 }">
					  			  <li><a href="project?id=${project.id }&p=${messages.nowPageNum - 1 }">上一页</a></li>
					  		</c:when>
					  	</c:choose>
					  	<c:choose>
					  		<c:when test="${messages.nowPageNum != messages.totalPages }">
					  			<li><a href="project?id=${project.id }&p=${messages.nowPageNum + 1 }">下一页</a></li>
					  		</c:when>
					  	</c:choose>
					</ul>
				</div>
				<div class="clear"></div>
			</div>
			<div class="span3">
				<div class="box">
					<div class="head">我的任务</div>
					<ul>
						<c:forEach var="task" items="${tasks }">
							<li>
								<a href="task?id=${task.goalId }" class="link-black">${task.name }</a> (${task.jibie })
							</li>
						</c:forEach>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btn").click(function() {
				var context = $("#context").val();
				if (context != "") {
                    $("#myform").submit();
                }
			});
		});
	</script>
</body>
</html>